Top | ![]() |
![]() |
![]() |
![]() |
GDataYouTubeQuery * | gdata_youtube_query_new () |
GDataYouTubeAge | gdata_youtube_query_get_age () |
void | gdata_youtube_query_set_age () |
const gchar * | gdata_youtube_query_get_license () |
void | gdata_youtube_query_set_license () |
void | gdata_youtube_query_get_location () |
void | gdata_youtube_query_set_location () |
const gchar * | gdata_youtube_query_get_order_by () |
void | gdata_youtube_query_set_order_by () |
const gchar * | gdata_youtube_query_get_restriction () |
void | gdata_youtube_query_set_restriction () |
GDataYouTubeSafeSearch | gdata_youtube_query_get_safe_search () |
void | gdata_youtube_query_set_safe_search () |
GDataYouTubeAge | age | Read / Write |
double | latitude | Read / Write |
char * | license | Read / Write |
double | location-radius | Read / Write |
double | longitude | Read / Write |
char * | order-by | Read / Write |
char * | restriction | Read / Write |
GDataYouTubeSafeSearch | safe-search | Read / Write |
GDataYouTubeQuery represents a collection of query parameters specific to the YouTube service, which go above and beyond those catered for by GDataQuery.
With the transition to version 3 of the YouTube, the “author” and
“start-index” properties are no longer supported, and their values
will be ignored. Use gdata_query_next_page()
instead of the
“start-index” API.
For more information on the custom GData query parameters supported by GDataYouTubeQuery, see the online documentation.
GDataYouTubeQuery *
gdata_youtube_query_new (const gchar *q
);
Creates a new GDataYouTubeQuery with its “q” property set to q
.
Since: 0.3.0
GDataYouTubeAge
gdata_youtube_query_get_age (GDataYouTubeQuery *self
);
Gets the “age” property.
Since: 0.3.0
void gdata_youtube_query_set_age (GDataYouTubeQuery *self
,GDataYouTubeAge age
);
Sets the “age” property of the GDataYouTubeQuery to age
.
Since: 0.3.0
const gchar *
gdata_youtube_query_get_license (GDataYouTubeQuery *self
);
Gets the “license” property.
Since: 0.11.0
void gdata_youtube_query_set_license (GDataYouTubeQuery *self
,const gchar *license
);
Sets the “license” property of the GDataYouTubeQuery to the new license value, license
.
Set license
to NULL
to unset the property in the query URI.
Since: 0.11.0
void gdata_youtube_query_get_location (GDataYouTubeQuery *self
,gdouble *latitude
,gdouble *longitude
,gdouble *radius
);
Gets the location-based properties of the GDataYouTubeQuery: “latitude”, “longitude”, “location-radius” and “has-location”.
self |
||
latitude |
a location in which to return the latitude, or |
[out caller-allocates][allow-none] |
longitude |
a location in which to return the longitude, or |
[out caller-allocates][allow-none] |
radius |
a location in which to return the location radius, or |
[out caller-allocates][allow-none] |
Since: 1.0.0
void gdata_youtube_query_set_location (GDataYouTubeQuery *self
,gdouble latitude
,gdouble longitude
,gdouble radius
);
Sets the location-based properties of the GDataYouTubeQuery: “latitude”, “longitude”, “location-radius” and “has-location”.
self |
||
latitude |
the new latitude, or |
|
longitude |
the new longitude, or |
|
radius |
the new location radius, or |
Since: 1.0.0
const gchar *
gdata_youtube_query_get_order_by (GDataYouTubeQuery *self
);
Gets the “order-by” property.
Since: 0.3.0
void gdata_youtube_query_set_order_by (GDataYouTubeQuery *self
,const gchar *order_by
);
Sets the “order-by” property of the GDataYouTubeQuery to the new order by string, order_by
.
Set order_by
to NULL
to unset the property in the query URI.
Since: 0.3.0
const gchar *
gdata_youtube_query_get_restriction (GDataYouTubeQuery *self
);
Gets the “restriction” property.
Since: 0.3.0
void gdata_youtube_query_set_restriction (GDataYouTubeQuery *self
,const gchar *restriction
);
Sets the “restriction” property of the GDataYouTubeQuery to the new restriction string, restriction
.
Set restriction
to NULL
to unset the property in the query URI.
Since: 0.3.0
GDataYouTubeSafeSearch
gdata_youtube_query_get_safe_search (GDataYouTubeQuery *self
);
Gets the “safe-search” property.
Since: 0.3.0
void gdata_youtube_query_set_safe_search (GDataYouTubeQuery *self
,GDataYouTubeSafeSearch safe_search
);
Sets the “safe-search” property of the GDataYouTubeQuery to safe_search
.
Since: 0.3.0
typedef struct _GDataYouTubeQuery GDataYouTubeQuery;
All the fields in the GDataYouTubeQuery structure are private and should never be accessed directly.
Since: 0.3.0
typedef struct { } GDataYouTubeQueryClass;
All the fields in the GDataYouTubeQueryClass structure are private and should never be accessed directly.
Since: 0.3.0
Video ages, allowing queries to be limited to videos uploaded in a recent time period.
retrieve all videos, regardless of the date they were uploaded |
||
retrieve only videos uploaded in the past day |
||
retrieve only videos uploaded in the past week |
||
retrieve only videos uploaded in the past month |
Since: 0.3.0
Safe search levels for removing restricted entries from query results. For more information, see the
online documentation.
YouTube will not perform any filtering on the search result set |
||
YouTube will filter some content from search results and, at the least, will filter content that is restricted in your locale |
||
YouTube will try to exclude all restricted content from the search result set |
Since: 0.3.0
“age”
property“age” GDataYouTubeAge
Restricts the search to videos uploaded within the specified time period. To retrieve videos irrespective of their
age, set the property to GDATA_YOUTUBE_AGE_ALL_TIME
.
Owner: GDataYouTubeQuery
Flags: Read / Write
Default value: GDATA_YOUTUBE_AGE_ALL_TIME
Since: 0.3.0
“latitude”
property “latitude” double
The latitude of a particular location of which videos should be found. This should be used in conjunction with
“longitude”; if either property is outside the valid range, neither will be used. Valid latitudes
are between -90
and 90
0 degrees; any values of this property outside that range
will unset the property in the query URI.
If “location-radius” is a non-0
value, this will define a circle from which videos should be
found.
For more information, see the online documentation.
Owner: GDataYouTubeQuery
Flags: Read / Write
Default value: 1.79769e+308
Since: 0.3.0
“license”
property “license” char *
The content license which should be used to filter search results. If set to, for example, GDATA_YOUTUBE_LICENSE_CC
, only videos which
are Creative Commons licensed will be returned in search results. Set this to NULL
to return videos under any license.
For more information, see the online documentation.
Owner: GDataYouTubeQuery
Flags: Read / Write
Default value: NULL
Since: 0.11.0
“location-radius”
property “location-radius” double
The radius, in metres, of a circle from within which videos should be returned. The circle is centred on the latitude and longitude given in “latitude” and “longitude”.
Set this property to 0
to search for specific coordinates, rather than within a given radius.
For more information, see the documentation for “latitude”.
Owner: GDataYouTubeQuery
Flags: Read / Write
Allowed values: >= 0
Default value: 0
Since: 0.3.0
“longitude”
property “longitude” double
The longitude of a particular location of which videos should be found. This should be used in conjunction with
“latitude”; if either property is outside the valid range, neither will be used. Valid longitudes
are between -180
and 180
degrees; any values of this property outside that
range will unset the property in the query URI.
For more information, see the documentation for “latitude”.
Owner: GDataYouTubeQuery
Flags: Read / Write
Default value: 1.79769e+308
Since: 0.3.0
“order-by”
property “order-by” char *
Specifies the order of entries in a feed. Supported values are relevance
,
published
, viewCount
and rating
.
Additionally, results most relevant to a specific language can be returned by setting the property
to relevance_lang_
, where
languageCode
languageCode
is an ISO 639-1 language code, as used in “language”.
For more information, see the online documentation.
Owner: GDataYouTubeQuery
Flags: Read / Write
Default value: NULL
Since: 0.3.0
“restriction”
property “restriction” char *
An ISO 3166 two-letter country code that should be used to filter videos playable only in specific countries.
Previously, this property could also accept the client’s IP address for country lookup. This feature is no longer supported by Google, and will result in an error from the server if used. Use a country code instead.
For more information, see the online documentation.
Owner: GDataYouTubeQuery
Flags: Read / Write
Default value: NULL
Since: 0.3.0
“safe-search”
property“safe-search” GDataYouTubeSafeSearch
Whether the search results should include restricted content as well as standard content.
For more information, see the online documentation.
Owner: GDataYouTubeQuery
Flags: Read / Write
Default value: GDATA_YOUTUBE_SAFE_SEARCH_MODERATE
Since: 0.3.0